package com.zyh.scs.admin.controller.jd;


import com.zyh.scs.admin.api.bo.JDCashierOrderPayDto;
import com.zyh.scs.admin.api.bo.PayResVo;
import com.zyh.scs.admin.base.open.LaoSheResponse;
import com.zyh.scs.admin.service.jd.JDCashierService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 京东锦礼-收银台
 */
@RestController
@RequestMapping("/v1.0/api/open/jd/cashier")
public class JDCashierController {

	@Autowired
    JDCashierService jdCashierService;

	/**
	 * 收银台-立即支付
	 *
	 * @param dto
	 * @param request
	 * @param response
	 */
	@PostMapping(value = "/pay")
	public LaoSheResponse<PayResVo> pay(@RequestBody @Validated JDCashierOrderPayDto dto,
										HttpServletRequest request, HttpServletResponse response){
		return jdCashierService.pay(dto, request, response);
	}

}